package com.econ.powercloud.ems.dal.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * 储能站离并网记录表
 *
 * @author jwc
 * @since 2022-08-09
 */
@Data
@Accessors(chain = true)
@TableName(value = "ems_grid_record")
public class EmsGridRecord {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 储能站id
     */
    @TableField(value = "energy_station_id")
    private String energyStationId;

    /**
     * 操作类型，1：并网操作，2：离网操作
     * 枚举：GridTypeEnum
     */
    @TableField(value = "type")
    private Integer type;

    /**
     * 操作结果，2：进行中，3：成功，4：失败，5：已终止
     * 枚举：GridRecordStatusEnum
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 结束时间
     */
    @TableField(value = "end_time")
    private Date endTime;

    /**
     * 操作人/创建人
     */
    @TableField(value = "created_by", fill = FieldFill.INSERT)
    private String createdBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 修改时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
}